import request from '@/utils/request'

export function insertQuestion(params) {
    return request('/api/question/insertQuestion', {
        method: "post",
        data: params
    })
}

export function insertExam(params) {
    return request('/api/exam/insertExam', {
        method: 'POST',
        data: params
    })
}
export function insertExamPaper(params) {
    return request('/api/examPaper/insertExamPaper', {
        method: 'POST',
        data: params
    })
}
export function getExamListByTeachId(params) {
    return request("/api/exam/getExamListByTeachId", {
        method: 'get',
        params
    })
}

export function getQuestionListByExamPaperId(params) {
    return request("/api/examPaper/getQuestionListByExamPaperId", {
        method: 'get',
        params
    })
}

export function updateExamByExamId(params) {
    return request("/api/exam/updateExamByExamId", {
        method: 'post',
        data: params
    })
}

export function getExamListByStuId(params) {
    return request("/api/exam/getExamListByStuId", {
        method: 'get',
        params
    })
}

export function submitAnswer(params) {
    return request("/api/scorePaper/submitAnswer", {
        method: 'post',
        data: params
    })
}

export function getScoreInfoByStuIdAndExamId(params) {
    return request("/api/scorePaper/getScoreInfoByStuIdAndExamId", {
        method: 'get',
        params
    })
}

export function getStuAnswerByExamId(params) {
    return request('/api/scorePaper/getStuAnswerByExamId', {
        method: 'get',
        params
    })
}

export function getScoreByExamId(params) {
    return request("/api/scorePaper/getScoreByExamId", {
        method: 'get',
        params
    })
}

export function getStudentByExamId(params) {
    return request("/api/exam/getStudentByExamId", {
        method: 'get',
        params
    })
}
